<?php

namespace app\user\validate;

use think\Validate;

class DiscussValidate extends Validate
{
    protected $rule = [
        'title|标题' => 'require|max:100',
        'content|内容' => 'require',
        'discuss_content|评论内容' => 'require|max:200',
        'discuss_id|文章ID' => 'require'
    ];

    protected $scene = [
        'write' => ['title', 'content'],
        'common' => ['discuss_content', 'discuss_id'],
        'delete_common' => ['discuss_id']
    ];
}